package cc.iits.demo.crane.api.bo;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 结果实体
 * @author 易俊
 */
@Data
public class Result<T> implements Serializable {

    private List<T> data;
    private T sum;
    private long total;
    private T avg;

    public Result() {

    }

    public Result(List<T> data, long total) {
        this.data = data;
        this.total = total < 0 ? 0 : total;
    }
}
